# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=irust
pkgver=1.71.15
pkgrel=0
pkgdesc="Cross-platform Rust REPL"
url="https://github.com/sigmaSd/IRust"
arch="all"
license="MIT"
depends="cargo rust"
makedepends="cargo cargo-auditable"
source="https://github.com/sigmaSd/IRust/archive/irust@$pkgver/irust-$pkgver.tar.gz"
builddir="$srcdir/IRust-irust-$pkgver"
options="!check"  # FIXME: tests don't run on CI (require TTY)

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
8f1c7875d8620ece052b37a9248bcaf6803e5ae896efe7ef16ecffe77dcf1a94fbe4f292f7002f861426f4d4965d5383d777f74d8ad46cc753e46f387beaf92f  irust-1.71.15.tar.gz
"
